home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / read.n < prev    next >
Encoding:
Text File  |  1994-12-17  |  1.3 KB  |  42 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" Copyright (c) 1994 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) read.n 1.3 94/12/17 16:18:40
  9. '\" 
  10. .so man.macros
  11. .HS read tcl
  12. .BS
  13. '\" Note:  do not modify the .SH NAME line immediately below!
  14. .SH NAME
  15. read \- Read from a file
  16. .SH SYNOPSIS
  17. \fBread \fR?\fB\-nonewline\fR? \fIfileId\fR
  18. .br
  19. \fBread \fIfileId numBytes\fR
  20. .BE
  21.  
  22. .SH DESCRIPTION
  23. .PP
  24. In the first form, all of the remaining bytes are read from the file
  25. given by \fIfileId\fR; they are returned as the result of the command.
  26. If the \fB\-nonewline\fR switch is specified then the last
  27. character of the file is discarded if it is a newline.
  28. In the second form, the extra argument specifies how many bytes to read;
  29. exactly this many bytes will be read and returned, unless there are fewer than
  30. \fInumBytes\fR bytes left in the file; in this case, all the remaining
  31. bytes are returned.
  32. \fIFileId\fR must be \fBstdin\fR or the return
  33. value from a previous call to \fBopen\fR; it must
  34. refer to a file that was opened for reading.
  35. .VS
  36. Any existing end-of-file or error condition on the file is cleared at
  37. the beginning of the \fBread\fR command.
  38. .VE
  39.  
  40. .SH KEYWORDS
  41. file, read
  42.